package com.liuym.admin.config;

import com.liuym.admin.resolver.AdminLoginUserResolver;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * @author Liuym
 * @date 2019/1/21 15:05
 * @describe：自定义参数解析器
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
        AdminLoginUserResolver adminLoginUserResolver = new AdminLoginUserResolver();
        argumentResolvers.add(adminLoginUserResolver);
    }
}
